﻿namespace Deppton.Model
{
    using System;
    using System.Collections.Generic;

    public class MatchCondition : Condition
    {
        public override bool Evaluate(Func<string, string> valueResolver, Func<string, NamedList<KeyValuePair<string, string>>> metadataResolver)
        {
            return string.Equals(valueResolver.Invoke(this.Identifier), this.ExpectedValue, StringComparison.OrdinalIgnoreCase);
        }

        public string Identifier
        {
            get;
            set;
        }

        public string ExpectedValue
        {
            get;
            set;
        }
    }
}
